package com.example.mybatis.datasource;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zll
 * 给当前线程绑定数据
 * 用于 动态获取数据源key
 */
public class DatabaseContextHolder {

    private static final ThreadLocal<String> contextHolder = new ThreadLocal();

    public static void setDataSourceType(String dataSourceType) {
        contextHolder.set(dataSourceType);
    }

    public static String getDataSourceType() {
        return contextHolder.get();
    }

}